<template>
 <div>
   <table>
      <tr>
        <td>名称</td>
        <td v-for="items in postlist">{{items.name}}</td>
      </tr>
      <tr>
        <td>
          状态
        </td>
        <td v-for="items in postlist">
          <el-tooltip class="switechbtn" :content="'当前状态: ' + items.switech" placement="bottom">
              <el-switch
                            v-model="items.switech"
                            active-color="#0080C0"
                            inactive-color="#ff4949"
                            active-value="开"
                            inactive-value="关">
                 </el-switch>
           </el-tooltip>
        </td>
      </tr>
   </table>
 </div>
</template>
<script>
export default {
  props: {
    'isShow': 'boolean'
  },
  data () {
    return {
      postlist:[
        {
          name:'市电1',
          switech:'switech1'
        },
        {
          name:'市电2',
          switech:'switech2'
        },
        {
          name:'市电3',
          switech:'switech3'
        },
        {
          name:'市电4',
          switech:'switech4'
        },
        {
          name:'市电5',
          switech:'switech5'
        },
        {
          name:'市电6',
          switech:'switech6'
        }

      ]
    }
  },
  computed: {

  },
  methods: {
    closeMyself () {
      this.$emit('on-close')
    }
  },
  created(){
      
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
table{
  width: 100%;
    border: 0px;
}
table td{
  max-width: 80px;
  height: 30px;
  text-align: center;
    border: 0px;
}
table tr{
  height: 30px;
  overflow: hidden;
  background: #f2f2f2;
  border: 0px;
}
</style>
